﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Unity;
using Unity.RegistrationByConvention;
using XYAuto.Monitor.IocUnity.Test.Service;
using XYAuto.Monitor.IocUnity.Test.Service.Impl;

namespace XYAuto.Monitor.IocUnity.Test
{
    class Program
    {
        static void Main(string[] args)
        {

            IUnityContainer mycontainer = new UnityContainer();


            mycontainer.RegisterAllTypes();
            mycontainer.RegisterType<IUserService, UserService>();

            var list = new UserClient(mycontainer.Resolve<IUserService>()).Execute();

            Console.WriteLine(JsonConvert.SerializeObject(list));
        }
    }
}
